package cn.sumpu.app.guoguojie.biz;

import java.util.Date;
import java.util.List;
import cn.sumpu.app.guoguojie.domain.Rush;
import cn.sumpu.app.guoguojie.domain.RushPhone;
import cn.sumpu.app.guoguojie.domain.RushPlan;
import cn.sumpu.app.guoguojie.domain.RushTime;
import cn.sumpu.app.guoguojie.domain.RushTimePart;
import cn.sumpu.app.guoguojie.exception.AppBusinessException;
import cn.sumpu.app.guoguojie.util.PageModel;

public interface RushBiz {
	//添加新活动计划
	public void insert(Rush rush)throws AppBusinessException;
	//查询所有活动计划
	public PageModel selectRushList(Integer page) throws AppBusinessException;
	//更新活动计划
	public void update(Rush rush)throws AppBusinessException;
	//删除活动计划
	public void delete(String identifier)throws AppBusinessException;
	//查询活动详情
	public List<RushPlan>selectRushPlanByRushId(String identifier)throws AppBusinessException;
	//查询计划
	public Rush select(String identifier)throws AppBusinessException;
	//添加事件
	public void insertRushPlan(RushPlan rushPlan)throws AppBusinessException;
	//插入事件时间
	public void insertRushTime(RushTime rushTime)throws AppBusinessException;
	//删除事件
	public void deleteRushPlan(String identifier)throws AppBusinessException;
	//删除事件时间
	public void deleteRushTime(String rushPlanId)throws AppBusinessException;
	//查询某一活动内某一事件的详情
	public RushPlan selectPlanByPlanId(String rushPlanId)throws AppBusinessException;
	//更新事件
	public void updateRushPlan(RushPlan rushPlan)throws AppBusinessException;
	//拆分时间段间隔
	public void insertRushTimePart(RushTime rushTime)throws AppBusinessException;
	//
	public RushTimePart insterRushPart(Integer partNum,Date startTimeDate,Integer timePartTimeInt)throws AppBusinessException;
	//删除时间段
	public void deleteRushTimePart(String rushPlanId)throws AppBusinessException;
	//在页面显示
	public  RushPlan selectRushPlanForGrid()throws AppBusinessException;
	//定时发布
	public void initCountRandomPart()throws AppBusinessException;
	//记录中奖人的信息
	public void insertRushPhone(RushPhone rushPhone) throws AppBusinessException;
	//判断手机号码是否参加过活动
	public Boolean selectPhone(String phoneNum)throws AppBusinessException;
	//
	public Boolean selectIsWinning(String family,String ip,String rushType,String planId,String phoneNum)throws AppBusinessException;
	//
	public List<RushPhone>selectAllPhone()throws AppBusinessException;
	//查询某活动内的事件集合
	/*public List<RushPlan> selectRushPlanListForGrid(String rushId) throws  AppBusinessException;
	//当前时间是否为真
	public Boolean whetherRushTime(Date time,Integer timeNum,Integer num) throws  AppBusinessException;*/
}
